<link href="./css/style.css" rel="stylesheet" type="text/css" />
<script src="./js/jquery.js"></script>
<div class="main">
<div class="userlist">
	<p class="tt"><a>首页</a>><a>财务管理</a>><span>线下充值</span></p>
	<div class="div">
		<form method='GET' action="?" class='search' >		
			<p><span>会员账户</span><input type='text' name='uname' value="{$uname}" placeholder='请输入会员账户' /></p>
			<p><span>开始时间</span><input type='date' name='stime' value="{$stime}" /></p>		
			<p><span>结束时间</span><input type='date' name='etime' value="{$etime}" /></p>
			<p><span>审核进度</span>
				<select name='state'>
					<option {if($state==3)} selected {/if} value='3' >全部记录</option>
					<option {if($state==0)} selected {/if} value='0'>{$czarr[0]}</option>
					<option {if($state==1)} selected {/if} value='1'>{$czarr[1]}</option>
					<option {if($state==2)} selected {/if} value='2'>{$czarr[2]}</option>
				</select>
			</p>
			<p><input type='submit' value='立即搜索' /></p>
		</form>
	</div>
	<div class="list">			
{if($msg==0)}
		<p class='none'>未查询到资料</p>
{else}
	<table class='aa'>
		<tr class='tr'><td class='s1'>ID</td><td>账户</td><td>姓名</td><td>金额</td><td>收款码</td><td>打款截图</td><td>提交时间</td><td>审核时间</td><td>充值进度</td><td>操作</td></tr>
	{loop $clist $key as $list}
	<tr>
		<td>{$list[Id]}</td>
		<td>{$list[uname]}</td>
		<td>{$list[tname]}</td>
		<td>{$list[cash]}</td>
		<td class="pic1">
			{if($list['skpic'])}
			<img src="{$list[skpic]}" style="height:30px; width:auto;">
			{/if}
		</td>
		<td class="pic2">
			{if($list['uppic'])}
			<img src="{$list[uppic]}" style="height:30px; width:auto;">
			{/if}
		</td>
		<td>{$list[addtime]}</td>
		<td>{$list[endtime]}</td>
		<td>{$czarr[$list[state]]}</td>
		<td>{if($list['state']==0)}<a class='abtn2' style='display:inline-block;float:none; ' onclick="dk({$list[Id]})">审核</a> <a class='abtn3' style='display:inline-block;float:none; ' onclick="dkno({$list[Id]})">驳回</a>{else}<a></a>{/if}</td>
	</tr>
	{/loop}
</table>
{$page1}
{/if}
</div>
</div>
<script>
	$(".pic1").on("click",'img',function(){
		$(this).addClass('on');
	});
	$(".pic1").on("click",'.on',function(){
		$(this).removeClass('on');
	});
	$(".pic2").on("click",'img',function(){
		$(this).addClass('on');
	});
	$(".pic2").on("click",'.on',function(){
		$(this).removeClass('on');
	});
	function dkno(id){
		var message = confirm("确认驳回申请？");
		if(message == true){
		$.ajax({
		type:"post",
		dataType:"json",
		url:"/Moudel.php?m=m&a=czcancel",
		data:"id="+id,
		success:function(d){
			if(d[0]==0){
				alert(d[1]);
			}else{
				window.location.href='czlist.php?state={$state}&stime={$stime}&etime={$etime}&page={$page}&uname={$uname}';
			}
		}
		});	
		}
	}
	function dk(id){
		var message = confirm("确认已打款？");
		if(message == true){
		$.ajax({
		type:"post",
		dataType:"json",
		url:"/Moudel.php?m=m&a=czpass",
		data:"id="+id,
		success:function(d){
			if(d[0]==0){
				alert(d[1]);
			}else{
				window.location.href='czlist.php?state={$state}&stime={$stime}&etime={$etime}&page={$page}&uname={$uname}';
			}
		}
		});	
		}
	}
	h1 = $(".main").height();
	h2 = $(".tixianlist").height();
	if(h2>h1){
		$(".main").css("height","auto");
	}
</script>